import VueCountTo from "../VueCountTo";
var MyCountTo = {
    name: 'MyCountTo',
    template: '<count-to :startVal="prevData" :endVal="data" :suffix="suffix" :decimals="decimals"/>',
    components: {
        'count-to': VueCountTo
    },
    props: {
        data: {
            type: Number,
            default: null,
        },
        suffix: {
            type: String,
            default: ''
        },
        duration: {
            type: Number,
            default: 1000
        },
        decimals: {
            type: Number,
            default: 0
        }
    },
    data: function () {
        return {
            prevData: 0
        }
    },
    watch: {
        data: function (nextValue, prevValue) {
            this.prevData = prevValue
        }
    },
};